<extend name="template/base_index" />

<block name="area_header">
<style type="text/css">
	textarea{resize: none;}
</style>
</block>

<block name="area_body">
	{:W('Menus/topbar')}
	<div class="admin-main container-fluid">
		{:W('Menus/left')}
		<div class="admin-main-content">
			{:W('Menus/breadcrumb')}
			<h3>帖子管理</h3>
			<div class="member_access">
				<blockquote><p class="text-primary">论坛帖子管理</p></blockquote>
				<form class="form-inline" method="get" name="display" action="{:U('Admin/BbsForumPost/index')}">
					<div class="form-group">
						<label>显示状态</label>
						<label class="radio-inline">
							<notempty name="uid"><input type="hidden" name="uid" value="{$uid}"></notempty>
							<input type="radio" name="display" value="1" <eq name="display" value="1">checked="checked"</eq> class="display">已显示
						</label>
						<label class="radio-inline">
							<input type="radio" name="display" value="0" class="display" <eq name="display" value="0">checked="checked"</eq>>未显示
						</label>
					</div>
				</form>
				<div class="form-control-static">
					<a href="{:U(CONTROLLER_NAME .'/bulkDeletePost')}" class="confirm ajax-post btn btn-danger btn-sm" target-form="selectitem">选中项删除</a>
				</div>
				<table class="table table-striped table table-hover  table-condensed">
					<thead>
					<tr>
						<th>
							<input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');">
							PID
						</th>
						<th>
							标题
						</th>
						<th>
							内容
						</th>
						<th>
							发表时间
						</th>
						<th>
							是否通过审核
						</th>
						<th>
							所在论坛是否是要审核
						</th>
						<th>
							帖子楼层
						</th>
						<th>
							主题ID
						</th>
						<th>
							{:L('OPERATOR')}
						</th>
					</tr>
					</thead>
					<tbody>
					<empty name="list">
						<tr>
							<td colspan="7" class="text-center">{:L('NO_DATA')}</td>
						</tr>
						<else/>
						<volist name="list" id="vo">
							<tr>
								<td>
									<input type="checkbox" value="{$vo.pid}" name="ids[]" class="selectitem">
									{$vo.pid}</td>
								<td>
									<div style="width: 250px; overflow: hidden; text-overflow:ellipsis; white-space:nowrap; ">{$vo.subject}</div></td>
								<td>
									<div style="width: 250px; overflow: hidden; text-overflow:ellipsis; white-space:nowrap; ">{$vo.message}</div></td>
								<td>
									{$vo.dateline|date="Y-m-d H:i:s",###}</td>
								<td>
									<eq name="vo.invisible" value="1">已审核<else />未审核</eq></td>
								<td>
									<eq name="vo.modnewposts" value="1">需要审核<else />不用审核</eq></td>
								<td>
									{$vo['position']+1}</td>
								<td>
									<a href="{:U('Admin/BbsThread/view',array('tid'=>$vo['tid'],'activesubmenuid'=>309))}">{$vo.tid}</a></td>
								<td>
									<a href="{:U(CONTROLLER_NAME .'/detail',array('pid'=>$vo['pid']))}" class="btn btn-primary btn-sm" >详情</a>
									<a href="{:U(CONTROLLER_NAME .'/pass',array('pid'=>$vo['pid']))}" class="btn btn-warning btn-sm ajax-get confirm" >通过审核</a>
									<a href="{:U(CONTROLLER_NAME .'/deletePost',array('pid'=>$vo['pid']))}" class="btn btn-danger ajax-get confirm btn-sm" >删除</a>
								</td>
							</tr>

						</volist>
					</empty>
					</tbody>
				</table>
				<div>{$show}</div>
			</div>
		</div>
		<!-- END admin-main-content -->
	</div>
		<!-- END admin-main-->
</block>

<block name="area_footer">
	<script>
		$(".display").click(function () {

			$("form[name='display']").submit();
		});
	</script>
</block>
